<template>
  <div>
    Lazyload
    <img style="width:500px" v-lazy="imgUrl"/>
    <img style="width:500px" v-lazy="imgObj"/>
  </div>
</template>

<script>
export default {
  name: "lazyload",
  data() {
    return {
      imgObj: {
        src:"https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1595750034843&di=832b53f762abf47ed7819d6609fa03a4&imgtype=0&src=http%3A%2F%2Fattach.bbs.miui.com%2Fforum%2Fmonth_1012%2F10120514509c7244b23f4a2fa5.jpg",
        error: require("../assets/error.jpg"),
        loading: require("../assets/loading.gif")
      },
      imgUrl: 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1595751882093&di=37e693992d4001cbf4feafa301f48fd2&imgtype=0&src=http%3A%2F%2Fimg0.imgtn.bdimg.com%2Fit%2Fu%3D2811584385%2C4107951140%26fm%3D214%26gp%3D0.jpg' 
    };
  },
};
</script>

<style scoped>
</style>